package com.allqj.sfx.ddd.member.infrastructure.converter;

import com.allqj.sfx.ddd.member.domain.entity.flow.FlowType;
import com.allqj.sfx.ddd.member.infrastructure.dao.FlowTypeDAO;
import com.allqj.sfx.ddd.member.infrastructure.po.FlowTypeDO;
import com.allqj.sfx.infrastructure.converter.DataConverter;
import org.springframework.beans.BeanUtils;

/**
 * @author sjw
 * @className FlowTypeConverter
 * @date 2022/7/20 15:37
 * @description: FlowType&FlowTypeDO转换器
 */
public class FlowTypeConverter implements DataConverter<FlowType, FlowTypeDO, FlowTypeDAO> {

    // 转换器实例
    public static FlowTypeConverter INSTANCE = new FlowTypeConverter();


    @Override
    public FlowType do2Entity(FlowTypeDO flowTypeDO) {
        if (flowTypeDO == null)
            return null;
        FlowType flowType = new FlowType();
        BeanUtils.copyProperties(flowTypeDO, flowType);
        return flowType;
    }

    @Override
    public FlowTypeDO entity2Do(FlowType flowType) {
        return null;
    }

    @Override
    public FlowTypeDO entity2Do(FlowType flowType, FlowTypeDAO flowTypeDAO) {
        return null;
    }
}
